Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Ultimate Basic Extension for the C64
2012-04-17 23:15
doctorfargo

Registered: Aug 2011
Posts: 20
Ultimate Basic Extension for the C64

I’ve been dreaming about the ultimate basic extension for the C64 for a few years.

There was many basic extensions for the C64 made in the 80’s – but there are a few problems with them

• No support for newer hardware like the 1581, mice, etc
• No support for newer routines and things like fast loaders, tracker music, IFLI graphics, etc
• Take up too much memory – leaving little free Basic space for your code
• Some do not feature run time modules - so you need the basic extension cart or disk to run your program

So here is my idea… Create a new basic extension for the C64 that would be the ultimate Basic Extension. The thing about basic extensions is that they may have lot of new commands – but each command takes up precious memory space. So here is my idea – would it be possible to create a library of new commands and then come up with a way for the programmer to choose which commands that he wants to use for his program? For example, if I am designing a game that will be on the text screen – I don’t need 30+ graphic mode commands such as circle, line, fill, etc to be in memory – since I’m not using the graphic mode in the first place. By just having the commands that I need – I could save RAM space – and that would give me more space to use for my BASIC program.

This library of commands could either be stored on a disk – or could all be loaded into an REU unit and each command could be brought into the C64 memory as needed. But a runtime module with only the commands needed for the program could be created so the program could be run a stock C64 without the need for special hardware. Also in this way – more commands could be created as time goes on.

Also with a REU – it would be possible to create a programming studio of sorts – that would be preloaded into the REU. Maybe kind of like the way SEUCK is laid out. The user could press a key combo and then the studio menu would pop up – kind of like a freezer on a cartridge. The basic code in the C64 could be stored in the REU ram and then another program could be swapped in. There could be a sprite editor, character editor, paint program, etc. - all at the programmer’s disposal – this would allow for easy editing of the elements of the program instead of having to save the BASIC program to disk – and then load each program - do the editing – save it – and then reload the BASIC program.

So is this a crazy idea or is it actually a possible project that could be done? Any takers out there?

2012-04-18 00:34
Moloch

Registered: Jan 2002
Posts: 2896
I'm not a fan of BASIC, but some of your suggestions sound like the recent Loadstar dotBASIC extension.

Quote:
My "wish list" looked like this:
Real command names, proceeded by a dot as in DotBASIC, but not limited to two-letter mnemonics.
All the commands already available in Mr.Mouse 2.1.
The ability to add commands at will like ARM.
Modulettes (command code) had to be relocatable, but also able to access other modulettes as subroutines.
Multiple modulettes needed to be able to share data with total safety.
Everything needed to be loadable when a program booted.
Everything had to be "put away" neatly when the program was terminated, leaving a nice, clean default C-64 for the next program to use on Loadstar.


https://sites.google.com/site/moormansundance/programming-page-..
2012-04-18 00:56
doctorfargo

Registered: Aug 2011
Posts: 20
There are a number of problems with DotBasic though:
#1 - The project is dead. Development stopped in 2008
#2 - It doesn't have any sprite or graphic commands
#3 - It still sucks up a lot of memory
#$ - It is nothing new - it is simply Loadstar's Mr. Mouse converted from SYS commands to Basic commands.
2012-04-18 05:39
Marauder/GSS
Account closed

Registered: Jul 2006
Posts: 224
I have written such a Basic+ extension somewhere in 1991 (and converted old source to ACME in 2007), which can basicly do things like this.

the Basic-commands are:

!OFF
turns extension off.

!LIST
lists all commands available.

!LOAD [SBWB]
loads memory/file: !load "filename",drive,start,value$01

!SAVE [SBWWB]
saves memory/file: !save "filename",drive,start,end,value$01

!ADDCMD [SSWW]
adds a new command: !addcmd "name","params",adr,paramcache

!DELCMD
deletes a command: !delcmd "name"

!LOADCMD [SB]
loads commandlist: !loadcmd "filename",drive

!SAVECMD [SB]
saves current commandlist: !savecmd "filename",drive

Parameter for commands could be BYTE, INT, UINT, FLOAT, STRING
The max. number of parameters is set to 32, max. number of new commands to 128.

So you could add a new parameter like this:

!ADDCMD "COLOR", "BB", 4096, 0

Using the command this would call $1000. In AKKU you get the parameter-count, and in X/Y the address to the parameters. If paramcache is set to 0, then memory will be automaticly allocated/freed for the parameters else they will be stored at defined address.
There's also a help-function for your MC code to retrieve a specific parameter then...

from Basic you can use the command like that then:

!COLOR 2,3

or like

10 A=2
20 B=3
30 !COLOR A,B

AFAIR I wanted to add that you could also use the new commands in the parameter, but that is not working I think.
I wanted to add also feature for a RETURN CODE, so a value could be returned from command. (I think it can use the USR-function for returning values)

Also currently no (source-codes for) new commands/library are done... so someone need to start programming the MC for new commands :D


Not sure if it's that you're looking for....The basic extension was never released, so I could provide source-code (for codebase?) or add the file with sources if wanted...
2012-04-18 07:44
AmiDog

Registered: Mar 2003
Posts: 97
Exquisite Basic has the ability to disable stuff you don't need to preserve memory. It's quite old though and doesn't support recent hardware addons.

Laser basic does seem quite interesting (the manual talks about threads and stuff), but I haven't tried it myself.
2012-04-18 12:48
chatGPZ

Registered: Dec 2001
Posts: 11119
or you could forget basic once and for all and use C, which by principle works with a library. cc65 is also under active development, and compiles to better code than you could ever get from basic.
2012-04-18 13:00
Repose

Registered: Oct 2010
Posts: 222
Marauder I think that's a very flexible approach.
I'm working on a basic compiler that let's you include only the runtime elements you need, and you can also add your own commands. It uses threaded p-code to be fast but short.
I've also wanted to write a display compiler, that you could write like display lists on Atari.
2012-04-18 13:54
Marauder/GSS
Account closed

Registered: Jul 2006
Posts: 224
yes Repose, the goal was to have a small flexible basic entension (think it's around 8-9 blocks including tables/commands for the basic commands above) where commands could be added/deleted on the fly and separate code modules/libraries loaded when needed.

Like said, that was written back in 1991 and never got released. I guess mainly because I stopped C64 activities and never wrote any code modules/libraries back then.
And I just converted it from Turbo Ass to ACME in 2007 when I was bored... :D

Maybe I add some samples and add the source-code to *codebase* if it would help anyone (though I doubt this :D)...

your basic compiler idea sounds also neat.. (:
2012-04-18 14:16
Oswald

Registered: Apr 2002
Posts: 5018
I think Graphic Basic is the best. Built in sprite editor, support for music, sprite movement, screen scrolling, split graphic / text screens, dir command (prg is not erased), definable F keys, etc. It could be hacked to work with AR fastloader (probably it would work with AR's loader routine replace hack), run from a rom so it doesnt occupies ram, etc.

Stuff like ifli, tracker music belongs to the world of demos and assembly, and not to basic extensions.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Steveboy
St0rmfr0nt/Quantum
Sentinel/Excess/TREX
Unknown
awsm/MYD
CA$H/TRiAD
katon/Lepsi De
Adder/Triad
Hagar/The Supply Team
McMeatLoaf
commodore_freak
Guests online: 148
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Logo Graphicians
1 Sander  (9.9)
2 Facet  (9.6)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.05 sec.